package com.tongtech.system.domain;

import com.tongtech.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 客户信息表 customer
 *
 * @author xingyc
 */
public class Customer extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 客户id */
    private Long customerId;

    /** 客户名称 */
    private String name;

    /** 客户电话 */
    private String phone;

    /** 客户邮箱 */
    private String email;

    /** 客户性别 0-男 1-女 */
    private String sex;

    /** 客户单位 */
    private String unit;

    private Integer industryId;

    private String industryName;

    /** 客户行业祖级列表 */
    private String industryAncestors;

    /** 所属销售(用户id) */
    private Long marketerId;

    private String marketerName;

    /** 所属项目经理(用户id) */
    private Long projectManagerId;

    private String projectManagerName;

    /** 是否重要客户 0-否 1-是 */
    private Byte important;

    /** 客户信息状态:0-正常,1-停用 */
    private String status;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public Long getCustomerId()
    {
        return customerId;
    }

    @NotBlank(message = "客户信息名称不能为空")
    @Size(min = 0, max = 30, message = "客户信息名称长度不能超过30个字符")
    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public Integer getIndustryId() {
        return industryId;
    }

    public void setIndustryId(Integer industryId) {
        this.industryId = industryId;
    }

    public String getIndustryName() {
        return industryName;
    }

    public void setIndustryName(String industryName) {
        this.industryName = industryName;
    }

    public String getIndustryAncestors() {
        return industryAncestors;
    }

    public void setIndustryAncestors(String industryAncestors) {
        this.industryAncestors = industryAncestors;
    }

    public Long getMarketerId() {
        return marketerId;
    }

    public void setMarketerId(Long marketerId) {
        this.marketerId = marketerId;
    }

    public String getMarketerName() {
        return marketerName;
    }

    public void setMarketerName(String marketerName) {
        this.marketerName = marketerName;
    }

    public Long getProjectManagerId() {
        return projectManagerId;
    }

    public void setProjectManagerId(Long projectManagerId) {
        this.projectManagerId = projectManagerId;
    }

    public String getProjectManagerName() {
        return projectManagerName;
    }

    public void setProjectManagerName(String projectManagerName) {
        this.projectManagerName = projectManagerName;
    }

    public Byte getImportant() {
        return important;
    }

    public void setImportant(Byte important) {
        this.important = important;
    }

    public String getStatus()
    {
        return status;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("customerId", getCustomerId())
            .append("name", getName())
            .append("phone", getPhone())
            .append("email", getEmail())
            .append("sex", getSex())
            .append("unit", getUnit())
            .append("industryAncestors", getIndustryAncestors())
            .append("marketerId", getMarketerId())
            .append("projectManagerId", getProjectManagerId())
            .append("important", getImportant())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
